﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="FishTank.details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <asp:FormView ID="detailView" runat="server" width="100%" CssClass="detailView">
            <ItemTemplate>
                <h1><asp:Label ID="titleLbl" runat="server" Text="<%# Bind('Title') %>"></asp:Label></h1>
                <p class="author">
                    by <asp:Label ID="memberLbl" runat="server" Text='<%# Bind("MemberFullName") %>' />
                    created at <asp:Label ID="createdLbl" runat="server" Text='<%# Bind("CreatedDateTime") %>' />
                </p>
                <p style="width: 100%">
                    <asp:Image ID="aquariumImg" runat="server" ImageUrl="<%# Bind('ImagePath') %>" AlternateText="<%# Bind('ImageTitle') %>" 
                               Width="512" Height="256" CssClass="centered"/>
                </p>

                <p><asp:Label ID="DescriptionLabel" runat="server" Text='<%# Bind("Description") %>' /></p>

                <dl>
                    <dt>Type</dt>
                        <dd><asp:Label ID="AquariumTypeLabel" runat="server" Text='<%# Bind("AquariumType") %>' /></dd>
                    <dt>Temperature</dt>
                        <dd><asp:Label ID="TemperatureLabel" runat="server" Text='<%# Bind("Temperature") %>' />°C</dd>
                    <dt>Volume</dt>
                        <dd> <asp:Label ID="VolumeLabel" runat="server" Text='<%# Bind("Volume") %>' /> liters</dd>
                    <dt>Product</dt>
                        <dd><a href="<%# Eval("ProductURL") %>"><asp:Label ID="ProductLabel" runat="server" Text='<%# Bind("Product") %>' /></a></dd>
                    <dt>Last Cleaned Date</dt>
                        <dd> <asp:Label ID="LastCleanedDateTimeLabel" runat="server" Text='<%# Bind("LastCleanedDateTime") %>' />
                        </dd>
                    <dt>Cleaning period</dt>
                        <dd>Every <asp:Label ID="PeriodDaysCleaningLabel" runat="server" Text='<%# Bind("PeriodDaysCleaning") %>' /> days</dd>
                </dl>                 
            </ItemTemplate>
        </asp:FormView>
    
        <h2>Comments</h2>
        <asp:Repeater ID="commentView" runat="server">
            <ItemTemplate>
                <div class="commentView">
                    <h3><asp:Label ID="commentTitleLbl" runat="server" Text='<%# Bind("Title") %>' /></h3>
                    <p class="author">by <asp:Label ID="commentMemberLbl" runat="server" Text='<%# Bind("MemberFullName") %>' />
                        at <asp:Label ID="commentCreatedLbl" runat="server" Text='<%# Bind("CreatedDateTime") %>' /></p>
                    <p  class="comment"><asp:Label ID="commentLbl" runat="server" Text='<%# Bind("Description") %>' /></p>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    
</asp:Content>
